import 'package:sow_app_core/sow_app_core.dart';

class BookCommentModel {
  int id;
  String bookId;
  String createUserName;
  String commentContent;
  BookCommentModel.fromJson(e)
      : id = int.parse(e['id']),
        createUserName = e['createUserName'],
        bookId = e['bookId'],
        commentContent = e['commentContent'];
  toEntity() {
    return NovelComment(
      commentContent,
      createUserName,
      int.parse(bookId),
    );
  }

  toJson() => {
        'id': id,
        'bookId': bookId,
        'createUserName': createUserName,
        'commentContent': commentContent
      };
}
